import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
import { execSync } from "node:child_process";

// https://vitejs.dev/config/
export default defineConfig({
  base: '/Managementside/',
  server: {
    host: "0.0.0.0",
  },
  plugins: [react()],
  define: {
    __BUILD_INFO__: {
      time: new Date().toLocaleString(),
      branch: execSync("git rev-parse --abbrev-ref HEAD").toString().trim(),
    },
  },
  resolve: {
    alias: { "@": path.resolve(__dirname, "src") },
  },
});
